package single.demo05;

/**
 * 同步代码块
 */
public class Demo05 {

}
class Single{

    private Single(){};
    private static Single instance;

    private static  Single getInstance(){
        if(instance == null){
            synchronized (Single.class){
                instance = new Single();
            }
        }
        return instance;
    }
}